package com.openbravo.data.user;

import com.openbravo.basic.BasicException;
import com.openbravo.data.loader.SentenceList;
import com.openbravo.data.loader.TableDefinition;
import java.util.List;

public class ListProviderCreator
  implements ListProvider
{
  private SentenceList sent;
  private EditorCreator prov;
  private Object params;

  public ListProviderCreator(SentenceList paramSentenceList, EditorCreator paramEditorCreator)
  {
    this.sent = paramSentenceList;
    this.prov = paramEditorCreator;
    this.params = null;
  }

  public ListProviderCreator(SentenceList paramSentenceList)
  {
    this(paramSentenceList, null);
  }

  public ListProviderCreator(TableDefinition paramTableDefinition)
  {
    this(paramTableDefinition.getListSentence(), null);
  }

  public List loadData()
    throws BasicException
  {
    this.params = (this.prov == null ? null : this.prov.createValue());
    return refreshData();
  }

  public List refreshData()
    throws BasicException
  {
    return this.sent.list(this.params);
  }
}

/* Location:           D:\PowerFulPOS-2.30.2\openbravopos.jar
 * Qualified Name:     com.openbravo.data.user.ListProviderCreator
 * JD-Core Version:    0.6.0
 */